<script setup lang="ts">
import { _require } from "@@/utils/tools";
import { fixedDecimals, omitText } from "@@/utils/tools/format";
import dayjs from "dayjs";
import { apiFinancialGetLogs } from "@@/api/transaction/list";

//code
</script>

<template>
  <CrequestList :params="{ type: 2 }" :api="apiFinancialGetLogs">
    <template #item="{ item }">
      <div class="MT-md">
        <Ccard
          class="clip-path-2 Prow-xl auto-MT-sm"
          style="--clip-size: 60rem"
        >
          <div class="flex-A-C">
            <Rimage
              size="80rem"
              :src="_require('src/assets/images/coin/vcc.png')"
            />
            <h2 class="ML-lg">{{ fixedDecimals(item.money) }}</h2>
          </div>
          <div>{{ dayjs(item.created_at).format("YYYY/MM/DD HH:mm:ss") }}</div>
          <CcopyText :copy-text="item.produce.address" class="C-T3">{{
            item.produce.address
          }}</CcopyText>
          <div class="flex">
            <VanTag
              style="--clip-size: 20rem"
              class="clip-path-1 ML-auto Prow-sm Pcol-xs R-0"
              color="var(--C-M1)"
            >
              {{ fixedDecimals(item.base) }}
            </VanTag>
          </div>
        </Ccard>
        <div class="flex-J-C">
          <VanIcon class="shadow-M1" color="var(--C-M1)" name="add-o" />
        </div>
        <Ccard bg="var(--C-M1-O1)" class="clip-path-1 auto-MT-sm">
          <div class="flex-A-C">
            <Rimage
              size="80rem"
              :src="_require('src/assets/images/coin/usdt.png')"
            />
            <h2 class="ML-lg">{{ fixedDecimals(item.usdt) }}</h2>
          </div>
          <CcopyText :copy-text="item.send_txid" class="C-T3">
            {{ item.send_txid }}
          </CcopyText>
        </Ccard>
      </div>
    </template>
  </CrequestList>
</template>

<style lang="scss" scoped></style>
